@echo off
cd /d "%~dp0"

for /r %%i in (*.inf) do pnputil -i -a "%%i"
if not %errorlevel% == 0 if not %errorlevel% == 259 goto fail

:pass
timeout /t 10
goto end

:fail
echo.
echo.
echo Admin privileges are required to perform this driver installation.
echo Right-click this installation file and select "Run as Administrator"!
pause

:end